package com.yykj.user.center.server.repository.patient;

import com.yykj.user.center.server.model.Doctor;
import com.yykj.user.center.server.model.Patient;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author chenl
 * @version 1.0
 * @date 2021/10/20 22:24
 */
@Repository
public interface PatientRepository extends JpaRepository<Patient, String>, JpaSpecificationExecutor<Patient> {

    Patient findFirstByAccountAndHospitalId(String account,Integer hospitalId);

    Patient findByOpenidAndHospitalId(String openid,Integer hospitalId);

    Patient findFirstByOpenidAndHospitalId(String openid,Integer hospitalId);

    Patient findByAccountAndHospitalId(String account,Integer hospitalId);
}
